#include "SeqList.h"

void SLtest01()
{
    SL s;
    SLInit(&s);
    //SLPushBack(&s, 1);
    //SLPushBack(&s, 2);
    //SLPushBack(&s, 3);
    //SLPushBack(&s, 4);//1 2 3 4
    //SLPushBack(&s, 5);
    //SLPushBack(&s, 6);
    //SLPushBack(&s, 7);

    //SLPushFront(&s, 1);
    //SLPushFront(&s, 2);
    //SLPushFront(&s, 3);
    //SLPopBack(&s);
    //SLPopFront(&s);
    ////6 5 4 3 2 1
    //SLPrint(&s);
    //SLInsert(&s, 3, 0);
    //SLPrint(&s);
    //SLDestroy(&s);
    SLPushBack(&s, 1);
    SLPushBack(&s, 2);
    SLPushBack(&s, 3);
    SLPushBack(&s, 4);
    SLPrint(&s);

    SLErase(&s, 0);
    SLPrint(&s);
    SLErase(&s, s.size - 1);
    SLPrint(&s);

    int find = SLFind(&s, 2);
    if (find < 0)
    {
        printf("NO Find");
    }
    else
    {
        printf("find!!");
    }
    SLDestroy(&s);
}

int main()
{
    SLtest01();
    return 0;
}